package com.cskaoyan.mapper;

import com.cskaoyan.bean.Comment;
import com.cskaoyan.bean.CommentExample;
import java.util.List;

import com.cskaoyan.weixin.bean.comment.CommentVO;
import com.cskaoyan.weixin.bean.goods.CommentBean;
import com.cskaoyan.weixin.bean.goods.DataBean;
import org.apache.ibatis.annotations.Param;

public interface CommentMapper {
    long countByExample(CommentExample example);

    int deleteByExample(CommentExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Comment record);

    int insertSelective(Comment record);

    List<Comment> selectByExample(CommentExample example);

    Comment selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Comment record, @Param("example") CommentExample example);

    int updateByExample(@Param("record") Comment record, @Param("example") CommentExample example);

    int updateByPrimaryKeySelective(Comment record);

    int updateByPrimaryKey(Comment record);

    List<DataBean> selectComment(@Param("id") Integer id);




    Integer queryCommentedGoodsOfUser(@Param("userId") Integer userId,
                                      @Param("recvGoods") List<Integer> recvGoods);

    Integer queryCommentByPicUrls(@Param("valueId") Integer valueId,
                                  @Param("type") Byte type, @Param("showType") Byte showType);

    List<CommentVO> queryCommentOfGoods(@Param("valueId") Integer valueId,
                                        @Param("type") Byte type, @Param("showType") Byte showType);

    Integer selectUserHasCollect(@Param("userId") Integer userId, @Param("id") Integer id);
}

